#ifndef FS_ABSTRACT_PERSISTENT_DOCUMENT_H
#define FS_ABSTRACT_PERSISTENT_DOCUMENT_H

#include <ipersistentdocument.h>

#include <QtCore/QByteArray>
#include <QtCore/QFileInfo>

namespace fspersistence
{

class FsAbstractPersistentDocument : public core::IPersistentDocument
{
public:
    FsAbstractPersistentDocument(const QFileInfo& fileInfo,
        const core::IStorage* storage);
    virtual ~FsAbstractPersistentDocument();

    // IPersistentDocument
    QUrl url() const;
    core::MimeType mimeType() const;
    QString name() const;

    const core::IStorage* storage() const;

    const QByteArray* serializedData() const;

protected:
    QFileInfo m_fileInfo;
    const core::IStorage* m_storage;
    QByteArray m_data;
};

} // namespace fspersistence

#endif
